﻿Partial Public Class PropertyGridDictionary

    Sub New()

        ' Cet appel est requis par le concepteur.
        InitializeComponent()

        ' Ajoutez une initialisation quelconque après l'appel InitializeComponent().

    End Sub

    Public Sub StringFormatCellEditingTemplateButtonClick(sender As Object, e As System.Windows.RoutedEventArgs)
        Dim vm = New ViewModelFormat()
        ModuleDashboarding._uiservice.ShowMessage(vm)
        sender.DataContext.Value = "{0:" & vm.GetFormat() & "}"

    End Sub

    Public Sub StyleCellEditingTemplateButtonClick(sender As Object, e As System.Windows.RoutedEventArgs)
        Dim propgrid = New ViewDashboardPropertyGrid()

        Dim so = New StyleObject()

        Dim style = TryCast(sender.DataContext.Value, Windows.Style)

        If style IsNot Nothing Then
            so = StyleObject.FromStyle(style)
        End If
        propgrid.SetStyleObject(so)

        ModuleDashboarding._uiservice.ShowMessage(propgrid, Width:=600, Height:=600)

        sender.DataContext.Value = StyleObject.ToStyle(so)
    End Sub
End Class

Public Class DoubleToThicknessConverter
    Implements Windows.Data.IValueConverter



    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements Windows.Data.IValueConverter.Convert

    End Function

    Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements Windows.Data.IValueConverter.ConvertBack

    End Function
End Class